/*
 * Copyright 2012 Benoît Combe <benoit.combe@gmail.com>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package fr.ipst.spot.facades.entites;

import fr.ipst.spot.entites.Evenement;
import fr.ipst.spot.exceptions.SpotExceptionEjb;
import fr.ipst.spot.formulaires.entites.FormEvenement;
import fr.ipst.spot.formulaires.entites.FormEvenementId;
import fr.ipst.spot.interfaces.entites.locales.EvenementFacadeLocale;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Benoît Combe <benoit.combe@gmail.com>
 */
@Stateless
public class EvenementFacade extends AbstractFacade<Evenement> implements EvenementFacadeLocale {

    @PersistenceContext(unitName = "SPOT_Application-ejbPU")
    private EntityManager em;

    /**
     *
     * @return
     */
    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    /**
     *
     */
    public EvenementFacade() {
        super(Evenement.class);
    }

    /**
     *
     * @param formEvenement
     * @return
     * @throws SpotExceptionEjb
     */
    @Override
    public Evenement create(FormEvenement formEvenement) throws SpotExceptionEjb {
        return super.create(formEvenement);
    }

    /**
     *
     * @param formEvenement
     * @return
     * @throws SpotExceptionEjb
     */
    @Override
    public Evenement edit(FormEvenement formEvenement) throws SpotExceptionEjb {
        return super.edit(formEvenement);
    }

    /**
     *
     * @param formEvenementId
     * @return
     * @throws SpotExceptionEjb
     */
    @Override
    public Evenement find(FormEvenementId formEvenementId) throws SpotExceptionEjb {
        return super.find(formEvenementId);
    }

    /**
     *
     * @param formEvenementId
     * @throws SpotExceptionEjb
     */
    @Override
    public void remove(FormEvenementId formEvenementId) throws SpotExceptionEjb {
        super.remove(formEvenementId);
    }
}
